package ns

import org.apache.commons.logging.Log
import org.apache.commons.logging.LogFactory
import groovy.util.slurpersupport.GPathResult
import groovy.ui.InteractiveShell


class TestG {
	
	def imie
	def nazwisko
	
	def protected final Log log = LogFactory.getLog(this.getClass())
	
	public static final String OUT_KEY = "out";
	
	TestG(imie){
		this.imie = imie
		this.nazwisko = 'nowak'
	}
	

	
	def printHello(){
		println "hello world " + imie
		log.info "hello info " + imie
		log.debug "hello debug " + imie
	}
	
	static void main(args) {
		def jakub = new TestG("jakub")
		
		(new TestG("jakub")).printHello ()
		jakub.setImie "jakub777"
		jakub.imie = 'jakub8'
		println "test: " + jakub.imie + " " + jakub.getImie()
	/*	
		def Binding binding = new Binding();
		
       
     //   PrintStream ps = new PrintStream(new File("/tmp/console.txt"));
        PrintStream ps = System.out
        binding.setVariable(OUT_KEY, ps)
        binding.setVariable("jsi", jakub)
        
		def shell = new InteractiveShell(binding, System.in, ps, ps)
	
		shell.run()
		*/
	}
}